﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
using System.Threading;
namespace ChuyenLenhSanXuat
{
    public partial class TienTrinh : Telerik.WinControls.UI.RadForm
    {
       
        public TienTrinh()
        {   
            InitializeComponent();
          
            backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
            backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker1_RunWorkerCompleted);
            
          
        }
       
        private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {

          /*  progressBar1.MarqueeAnimationSpeed = 0;
            progressBar1.Style = ProgressBarStyle.Blocks;
            progressBar1.Value = progressBar1.Minimum;*/
            this.Close();
        }

        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            DoSomething();
        }
        private void DoSomething()
        {
            while (radProgressBar1.Value1 < radProgressBar1.Maximum)
            {
                radProgressBar1.Value1 = radProgressBar1.Value1 + 10;
                Thread.Sleep(200);
            }
           // Thread.Sleep(20000);
        }

        private void TienTrinh_Load(object sender, EventArgs e)
        {
           
                ThemeResolutionService.ApplyThemeToControlTree(this, "Desert");

                radLabel1.Text = String.Format("Đang Thực Hiện Chuyển Lệnh {0}...", frm_ChuyenLSX.chuyenlenh);
            backgroundWorker1.RunWorkerAsync();
        }

    }
}
